(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 9.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[     40781,        953]
NotebookOptionsPosition[     39595,        913]
NotebookOutlinePosition[     39948,        929]
CellTagsIndexPosition[     39905,        926]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell[BoxData[{
 RowBox[{
  RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{"State", " ", "Specific", " ", "Subsidy", " ", 
    RowBox[{"vs", ".", " ", "Federal"}], " ", "Subsidy"}], " ", "*)"}], 
  "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{"INPUT", " ", "PARAMETERS"}], " ", "*)"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
   "Convert", " ", "2013", " ", "dollars", " ", "to", " ", "2014", " ", 
    "dollars"}], " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{"Use", " ", "CPI", " ", "data", " ", 
     RowBox[{"http", ":"}]}], "//", 
    RowBox[{
     RowBox[{
      RowBox[{"www", ".", "bls", ".", "gov"}], "/", "data"}], "/", 
     RowBox[{"inflation_calculator", ".", "htm"}]}]}], " ", "*)"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"cpi", "=", " ", "1.02"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{"Dollars", " ", "to", " ", "hour", " ", "conversion"}], " ", 
   "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{"Equal", " ", "to", " ", "price", " ", "of", " ", "time", " ", 
    RowBox[{"(", 
     RowBox[{"wage", " ", "rate"}], ")"}]}], "*)"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"c", "=", "1"}], ";"}], " ", "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
   "Damages", " ", "per", " ", "mile", " ", "across", " ", "regions"}], " ", 
   "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{"Input", " ", "from", " ", "Spreadsheet"}], "          ", "*)"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{" ", 
  RowBox[{"SetDirectory", "[", "\"\<\>\"", "]"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
   "Input", " ", "values", " ", "for", " ", "mu", " ", "and", " ", "A", " ", 
    "from", " ", "calibration"}], " ", "*)"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"muanda", "=", 
    RowBox[{"Import", "[", 
     RowBox[{"\"\<calibrate parms.xlsx\>\"", ",", 
      RowBox[{"{", 
       RowBox[{"\"\<Data\>\"", ",", "1"}], "}"}]}], "]"}]}], ";"}], 
  " "}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"theas", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", "muanda", "]"}], "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"themus", "=", 
    RowBox[{
     RowBox[{"Transpose", "[", "muanda", "]"}], "[", 
     RowBox[{"[", "2", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{"which", " ", "mu", " ", "to", " ", "use"}], " ", "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{"either", " ", "1"}], ",", 
    RowBox[{"2", " ", "or", " ", "3"}]}], " ", "*)"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"nummus", "=", 
    RowBox[{"Length", "[", "theas", "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{"For", "[", 
  RowBox[{
   RowBox[{"index", "=", "1"}], ",", 
   RowBox[{"index", "\[LessEqual]", "nummus"}], ",", 
   RowBox[{"index", "++"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"Clear", "[", 
     RowBox[{
     "thedatin", ",", "thedat", ",", "weight", ",", "\[Delta]gv", ",", 
      "\[Delta]ev", ",", "m", ",", " ", "Sv", ",", "Rv", ",", "s", ",", "R", 
      ",", "gv", ",", "eev", ",", "xgv", ",", "xev", ",", "Lgv", ",", "Lev", 
      ",", "Wv", ",", "piv", ",", "Welfv", ",", "soptv", ",", "singlev", ",", 
      "optwel", ",", "singwel", ",", "piprodsingle", ",", "pisingle", ",", 
      "exact", ",", "Tgv", ",", "Tev", ",", "tg", ",", "te", ",", "tgoptv", 
      ",", "teoptv", ",", "singletg", ",", "singlete", ",", "bestt", ",", 
      "optwel", ",", "gastaxv", ",", "welregion", ",", "temp", ",", "welone", 
      ",", "gtax", ",", "welonetax", ",", "ansr", ",", "sub"}], "]"}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"munum", "=", "index"}], ";", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "county", " ", "data", " ", "missing", " ", "value", " ", "for", " ", 
      "clifton", " ", "forge", " ", "va"}], " ", "*)"}], 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"give", " ", "it", " ", "zero"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"thedatin", "=", 
     RowBox[{"Import", "[", 
      RowBox[{"\"\<B-states_full.xlsx\>\"", ",", 
       RowBox[{"{", 
        RowBox[{"\"\<Data\>\"", ",", "1"}], "}"}]}], "]"}]}], ";", " ", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"get", " ", "rid", " ", "of", " ", "column", " ", "labels"}], 
     " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"thedat", "=", 
     RowBox[{"Drop", "[", 
      RowBox[{"thedatin", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"convert", " ", "to", " ", "dollars"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"weight", " ", "=", " ", 
     RowBox[{
      RowBox[{
       RowBox[{"Transpose", "[", "thedat", "]"}], "[", 
       RowBox[{"[", "5", "]"}], "]"}], "/", 
      RowBox[{"Total", " ", "[", 
       RowBox[{
        RowBox[{"Transpose", "[", "thedat", "]"}], "[", 
        RowBox[{"[", "5", "]"}], "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", 
    RowBox[{"\[Delta]gv", "=", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"Transpose", "[", "thedat", "]"}], "[", 
        RowBox[{"[", "3", "]"}], "]"}], "/", "c"}], "/", "100"}]}], ";", " ", 
    
    RowBox[{"(*", 
     RowBox[{"damages", " ", "per", " ", "mile", " ", "gas"}], " ", "*)"}], 
    "\[IndentingNewLine]", 
    RowBox[{"\[Delta]ev", " ", "=", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"Transpose", "[", "thedat", "]"}], "[", 
        RowBox[{"[", "4", "]"}], "]"}], "/", "c"}], "/", "100"}]}], ";", " ", 
    
    RowBox[{"(*", 
     RowBox[{"damages", " ", "per", " ", "mile", " ", "electric"}], " ", 
     "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Print", "[", "thedat", "]"}], "*)"}], "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Number", " ", "of", " ", "Regions"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"m", "=", 
     RowBox[{"Length", "[", "\[Delta]gv", "]"}]}], ";", "\[IndentingNewLine]",
     "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
      RowBox[{"weight", "=", 
       RowBox[{"ConstantArray", "[", 
        RowBox[{
         RowBox[{"1", "/", "m"}], ",", "m"}], "]"}]}], ";"}], "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Calibrated", " ", "Parameters"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"pt", "  ", "Price", " ", "of", " ", "time"}], " ", "*)"}], 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"p", "   ", "Price", " ", "of", " ", "electric", " ", "car"}], 
     " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"pc", "  ", "Price", " ", "of", " ", "gas", " ", "gar"}], " ", 
     "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"pg", "  ", "Price", " ", "of", " ", "gas"}], " ", "*)"}], 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"pe", "  ", "Price", " ", "of", " ", "electricity"}], " ", 
     "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"T", "   ", "Endowment", " ", "of", " ", "time"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "\[Mu]", "   ", "Variance", " ", "of", " ", "random", " ", "variables"}],
      "  ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"\[Gamma]g", "  ", "Gas", " ", "preference", " ", "parameter"}], 
     " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "\[Gamma]e", "  ", "Electric", " ", "Preference", " ", "parameter"}], 
     " ", "*)"}], "\[IndentingNewLine]", " ", "\[IndentingNewLine]", 
    RowBox[{"pt", "=", "1"}], " ", ";", "\[IndentingNewLine]", 
    RowBox[{"p", "=", 
     RowBox[{"35170", "*", 
      RowBox[{"cpi", "/", "c"}]}]}], ";", " ", "\[IndentingNewLine]", 
    RowBox[{"pc", "=", 
     RowBox[{"16810", "*", 
      RowBox[{"cpi", "/", "c"}]}]}], ";", "\[IndentingNewLine]", 
    RowBox[{"pe", "=", 
     RowBox[{"0.0389052", " ", "*", 
      RowBox[{"cpi", "/", "c"}]}]}], ";", "\[IndentingNewLine]", 
    RowBox[{"pg", "=", 
     RowBox[{"0.1125", "*", 
      RowBox[{"cpi", "/", "c"}]}]}], ";", "\[IndentingNewLine]", " ", 
    RowBox[{"T", "=", " ", 
     RowBox[{
     "10", " ", "*", " ", "52", " ", "*", " ", "827", " ", "*", "cpi"}]}], 
    ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Elasticity", " ", "of", " ", "demand", " ", "for", " ", "miles"}], " ", 
     "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Elasticity", " ", "=", " ", 
      RowBox[{
       RowBox[{"-", "1"}], "/", "\[Gamma]"}]}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"\[Gamma]g", "=", "2"}], ";", "\[IndentingNewLine]", 
    RowBox[{"\[Gamma]e", "=", "2"}], ";", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"lifetime", " ", "miles"}], " ", "*)"}], "\[IndentingNewLine]", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"lm", "=", "150000"}], ";", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
      RowBox[{"pick", " ", "kg"}], ",", " ", 
      RowBox[{
      "ke", " ", "such", " ", "that", " ", "consumer", " ", "selects", " ", 
       "150000", " ", "miles"}]}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"in", " ", "BAU"}], " ", "*)"}], "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"kg", "=", " ", 
     RowBox[{"pg", " ", 
      RowBox[{"lm", "^", "\[Gamma]g"}]}]}], ";", "\[IndentingNewLine]", 
    RowBox[{"ke", "=", 
     RowBox[{"pe", " ", 
      RowBox[{"lm", "^", "\[Gamma]e"}]}]}], ";", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"from", " ", "calibration"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", "  ", 
     RowBox[{"themus", "=", 
      RowBox[{"{", 
       RowBox[{"10735.3", ",", "16753.7", ",", "22451.1"}], "}"}]}], " ", 
     "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"current", " ", "federal", " ", "subsidy"}], " ", "*)"}], 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "program", " ", "is", " ", "set", " ", "up", " ", "to", " ", "tax", " ", 
      "purchases"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"so", " ", "subsidy", " ", "is", " ", "negative", " ", "tax"}], 
     " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "also", " ", "divide", " ", "by", " ", "value", " ", "of", " ", "time"}],
      " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"sub", "=", 
     RowBox[{"ConstantArray", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "7500"}], "/", "c"}], ",", "m"}], "]"}]}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"\[Mu]", "=", 
     RowBox[{"themus", "[", 
      RowBox[{"[", "munum", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
    RowBox[{"A", "=", 
     RowBox[{"theas", "[", 
      RowBox[{"[", "munum", "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"VECTOR", " ", "VARIABLES"}], " ", "*)"}], "\[IndentingNewLine]",
     "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Generic", " ", "Subsidy"}], " ", "*)"}], "\[IndentingNewLine]", 
    
    RowBox[{"Sv", "=", 
     RowBox[{"Array", "[", 
      RowBox[{"s", ",", "m"}], "]"}]}], ";", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Goverment", " ", "Revenue"}], " ", "*)"}], 
    "\[IndentingNewLine]", "     ", "\[IndentingNewLine]", 
    RowBox[{"Rv", " ", "=", 
     RowBox[{"Array", "[", 
      RowBox[{"R", ",", "m"}], "]"}]}], ";", "  ", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"gv", "=", " ", 
     RowBox[{"ConstantArray", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"pt", " ", "kg"}], ")"}], "/", "pg"}], " ", ")"}], "^", 
        RowBox[{"(", 
         RowBox[{"1", "/", "\[Gamma]g"}], ")"}]}], ",", "m"}], "]"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"eev", "=", 
     RowBox[{"ConstantArray", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{"pt", " ", "ke"}], ")"}], "/", "pe"}], " ", ")"}], "^", 
        RowBox[{"(", 
         RowBox[{"1", "/", "\[Gamma]e"}], ")"}]}], ",", "m"}], "]"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"xgv", "=", " ", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "pc"}], " ", "+", " ", "Rv", " ", "+", " ", 
        RowBox[{"pt", " ", "T"}], " ", "-", 
        RowBox[{"pg", " ", "gv"}]}], ")"}], " ", "/", "pt"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"xev", "=", " ", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "p"}], "  ", "+", " ", "Rv", " ", "-", "Sv", "+", " ", 
        RowBox[{"pt", " ", "T"}], " ", "-", " ", 
        RowBox[{"pe", " ", "eev"}]}], ")"}], "/", "pt"}]}], " ", ";", 
    "\[IndentingNewLine]", "\n", "\n", 
    RowBox[{"(*", " ", 
     RowBox[{"Indirect", " ", "utility"}], " ", "*)"}], "\[IndentingNewLine]",
     "\[IndentingNewLine]", 
    RowBox[{"Lgv", "=", " ", 
     RowBox[{"xgv", " ", "+", 
      RowBox[{"kg", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"gv", "^", 
           RowBox[{"(", 
            RowBox[{"1", "-", "\[Gamma]g"}], ")"}]}], "-", "1"}], ")"}], "/", 
        
        RowBox[{"(", 
         RowBox[{"1", "-", "\[Gamma]g"}], ")"}]}]}]}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"Lev", "=", " ", 
     RowBox[{"xev", " ", "+", " ", 
      RowBox[{"ke", " ", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"eev", "^", 
           RowBox[{"(", 
            RowBox[{"1", "-", "\[Gamma]e"}], ")"}]}], "-", "1"}], ")"}], "/", 
        
        RowBox[{"(", 
         RowBox[{"1", "-", "\[Gamma]e"}], ")"}]}]}], "+", "A"}]}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\n", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Expected", " ", "welfare", " ", "without", " ", "externalties"}], " ", 
     "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"Wv", "=", 
     RowBox[{"\[Mu]", " ", 
      RowBox[{"Log", "[", 
       RowBox[{
        RowBox[{"Exp", "[", 
         RowBox[{"Lgv", "/", "\[Mu]"}], "]"}], "+", 
        RowBox[{"Exp", "[", 
         RowBox[{"Lev", "/", "\[Mu]"}], "]"}]}], "]"}]}]}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", "\n", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Probability", " ", "of", " ", "selecting", " ", "electric", " ", 
      "car"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Use", " ", "simplify", " ", "to", " ", "eliminate", " ", "R", " ", 
      "term", " ", "in", " ", "pi"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"It", " ", "cancels", " ", 
      RowBox[{"out", " ", "!"}]}], "*)"}], "\[IndentingNewLine]", 
    RowBox[{"piv", "=", 
     RowBox[{"Simplify", "[", 
      RowBox[{
       RowBox[{"Exp", "[", 
        RowBox[{"Lgv", "/", "\[Mu]"}], "]"}], "/", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"Exp", "[", 
          RowBox[{"Lgv", "/", "\[Mu]"}], "]"}], "+", 
         RowBox[{"Exp", "[", 
          RowBox[{"Lev", "/", "\[Mu]"}], "]"}]}], ")"}]}], "]"}]}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\n", 
    RowBox[{"(*", " ", 
     RowBox[{"Government", " ", "Revenue"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Rv", "=", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "piv"}], ")"}], "Sv"}]}], " ", "*)"}], 
    "\[IndentingNewLine]", 
    RowBox[{"For", "[", 
     RowBox[{
      RowBox[{"k", "=", "1"}], ",", 
      RowBox[{"k", "\[LessEqual]", "m"}], ",", " ", 
      RowBox[{"k", "++"}], ",", 
      RowBox[{
       RowBox[{"R", "[", "k", "]"}], "=", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", 
          RowBox[{"piv", "[", 
           RowBox[{"[", "k", "]"}], "]"}]}], ")"}], 
        RowBox[{"s", "[", "k", "]"}]}]}]}], "]"}], ";", "\[IndentingNewLine]",
     "\n", "\[IndentingNewLine]", "\[IndentingNewLine]", "\n", 
    RowBox[{"(*", " ", 
     RowBox[{"Welfare", " ", "with", " ", "externaltieis"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"Welfv", " ", "=", " ", 
     RowBox[{"Wv", " ", "-", " ", 
      RowBox[{"\[Delta]gv", " ", "piv", " ", "gv"}], " ", "-", " ", 
      RowBox[{"\[Delta]ev", " ", 
       RowBox[{"(", 
        RowBox[{"1", "-", "piv"}], ")"}], " ", "eev"}]}]}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Optimal", " ", "region", " ", "specific", " ", "subsidies"}], 
     " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"soptv", "=", 
     RowBox[{"-", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"\[Delta]gv", " ", "gv"}], " ", "-", " ", 
        RowBox[{"\[Delta]ev", " ", "eev"}]}], ")"}]}]}], ";", 
    "\[IndentingNewLine]", "\n", "\[IndentingNewLine]", "\[IndentingNewLine]",
     "\[IndentingNewLine]", "\n", 
    RowBox[{"(*", " ", 
     RowBox[{"Optimal", " ", "single", " ", "subsidy"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"singlev", "=", 
     RowBox[{"-", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{"\[Delta]gv", ".", " ", "weight"}], ")"}], "gv"}], " ", "-",
         " ", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"\[Delta]ev", " ", ".", "weight"}], ")"}], " ", "eev"}]}], 
       ")"}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"singlev", "=", "sub"}], ";", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", "\n", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Welfare", " ", "at", " ", "optimal", " ", "region", " ", "specific", 
      " ", "subsidies"}], " ", "*)"}], "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"For", " ", "[", 
     RowBox[{
      RowBox[{"k", "=", "1"}], ",", 
      RowBox[{"k", "\[LessEqual]", " ", "m"}], ",", " ", 
      RowBox[{"k", "++"}], ",", " ", 
      RowBox[{
       RowBox[{"s", "[", "k", "]"}], "=", 
       RowBox[{"soptv", "[", 
        RowBox[{"[", "k", "]"}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]",
     "\[IndentingNewLine]", 
    RowBox[{"optwel", "=", 
     RowBox[{"Welfv", " ", ".", " ", "weight"}]}], ";", "\[IndentingNewLine]",
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Welfare", " ", ",", "  ", 
      RowBox[{"PI", 
       RowBox[{"(", 
        RowBox[{"1", "-", "PI"}], ")"}]}], ",", " ", 
      RowBox[{
      "and", " ", "PI", "  ", "at", " ", "optimal", " ", "single", " ", 
       "subsidy"}]}], " ", "*)"}], "\[IndentingNewLine]", 
    "\[IndentingNewLine]", 
    RowBox[{"For", " ", "[", 
     RowBox[{
      RowBox[{"k", "=", "1"}], ",", 
      RowBox[{"k", "\[LessEqual]", " ", "m"}], ",", " ", 
      RowBox[{"k", "++"}], ",", " ", 
      RowBox[{
       RowBox[{"s", "[", "k", "]"}], "=", 
       RowBox[{"singlev", "[", 
        RowBox[{"[", "k", "]"}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]",
     "\[IndentingNewLine]", 
    RowBox[{"singwel", " ", "=", 
     RowBox[{"Welfv", " ", ".", " ", "weight"}]}], ";", "\[IndentingNewLine]",
     "\[IndentingNewLine]", 
    RowBox[{"piprodsingle", "=", 
     RowBox[{"First", "[", 
      RowBox[{"Simplify", "[", 
       RowBox[{"piv", 
        RowBox[{"(", 
         RowBox[{"1", "-", "piv"}], ")"}]}], "]"}], "]"}]}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"pisingle", "=", 
     RowBox[{"First", "[", 
      RowBox[{"Simplify", "[", "piv", "]"}], "]"}]}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Exact", " ", "Welfare", " ", "Difference"}], " ", "*)"}], 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"exact", "=", " ", 
     RowBox[{"(", 
      RowBox[{"optwel", "-", "singwel"}], ")"}]}], ";", "\[IndentingNewLine]",
     "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Display", " ", "Results"}], " ", "*)"}], "\[IndentingNewLine]", 
    
    RowBox[{"Print", "[", 
     RowBox[{"\"\<Probability at current subsidy \>\"", ",", "pisingle"}], 
     "]"}], ";", "\[IndentingNewLine]", 
    RowBox[{"Print", "[", 
     RowBox[{"\"\<Welfare from state  \>\"", ",", 
      RowBox[{"AccountingForm", "[", 
       RowBox[{
        RowBox[{"optwel", "*", "c"}], ",", "15"}], "]"}]}], "]"}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"Print", "[", 
     RowBox[{"\"\<Welfare from uniform current subsidy (7500)  \>\"", ",", 
      RowBox[{"AccountingForm", "[", " ", 
       RowBox[{
        RowBox[{"singwel", "*", "c"}], ",", "15"}], "]"}]}], "]"}], ";", "\n", 
    RowBox[{"Print", "[", 
     RowBox[{"\"\<Exact  \>\"", ",", " ", 
      RowBox[{"exact", "*", "c"}]}], "]"}], ";", "\[IndentingNewLine]", 
    RowBox[{"Print", "[", 
     RowBox[{"\"\<Optimal Single Subsidy  \>\"", ",", " ", 
      RowBox[{
       RowBox[{"singlev", "[", 
        RowBox[{"[", "1", "]"}], "]"}], "*", "c"}]}], "]"}], ";", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"Print", "[", "\"\< \>\"", "]"}], ";", "\[IndentingNewLine]", 
    RowBox[{
    "Print", "[", "\"\< Data for Spreadsheet - Table_welfare_vx \>\"", "]"}], 
    ";", "\[IndentingNewLine]", 
    RowBox[{"Print", "[", 
     RowBox[{"\"\<Welfare from uniform current subsidy (7500)  \>\"", ",", 
      RowBox[{"AccountingForm", "[", " ", 
       RowBox[{
        RowBox[{"singwel", "*", "c"}], ",", "15"}], "]"}]}], "]"}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"Print", "[", "\"\< \>\"", "]"}], ";"}]}], "\[IndentingNewLine]", 
  "]"}]}], "Input",
 CellChangeTimes->{{3.610980900518314*^9, 3.6109809018852577`*^9}, {
   3.6109809764110537`*^9, 3.610981015425366*^9}, {3.610981135980332*^9, 
   3.610981141738846*^9}, {3.610981187338464*^9, 3.6109816571664057`*^9}, {
   3.6109816891734447`*^9, 3.6109821770651703`*^9}, {3.610982228852769*^9, 
   3.610982386941235*^9}, {3.610982418939946*^9, 3.6109824420429583`*^9}, {
   3.61098253261613*^9, 3.610982638306422*^9}, {3.61098267343849*^9, 
   3.6109827280907507`*^9}, {3.6109828003882713`*^9, 3.610983046705741*^9}, {
   3.61098307771229*^9, 3.610983172015789*^9}, {3.6109832043149548`*^9, 
   3.6109832573445873`*^9}, {3.6109833311010313`*^9, 3.610983452771846*^9}, {
   3.610983484407063*^9, 3.610983686550385*^9}, {3.6109837644422817`*^9, 
   3.610983798376422*^9}, {3.610983864218069*^9, 3.6109839455161858`*^9}, {
   3.61098398430768*^9, 3.61098398721798*^9}, {3.61098404049782*^9, 
   3.610984067394224*^9}, {3.610984106057178*^9, 3.610984109209504*^9}, {
   3.6109841592949953`*^9, 3.610984326385331*^9}, {3.6109843647845917`*^9, 
   3.610984523793378*^9}, {3.6109845557262163`*^9, 3.61098458655881*^9}, {
   3.610984632613119*^9, 3.610984761998685*^9}, {3.61098488388039*^9, 
   3.610984900586199*^9}, {3.6109857224214363`*^9, 3.610985730213636*^9}, {
   3.61098577458806*^9, 3.6109857970305758`*^9}, {3.610985841261018*^9, 
   3.6109858758629847`*^9}, 3.610985921683413*^9, {3.610985990802561*^9, 
   3.610986063636125*^9}, {3.610986105986088*^9, 3.610986124732169*^9}, {
   3.610986244677313*^9, 3.610986289114002*^9}, 3.611054311017941*^9, {
   3.6110543429988003`*^9, 3.611054363011042*^9}, 3.61105442568427*^9, {
   3.611054460506353*^9, 3.611054575108971*^9}, {3.611054757013483*^9, 
   3.61105479995434*^9}, {3.6110548647301207`*^9, 3.6110549421327*^9}, {
   3.61105499986604*^9, 3.6110550274231157`*^9}, {3.611055074686529*^9, 
   3.611055133091919*^9}, {3.61105516861237*^9, 3.611055381945657*^9}, 
   3.6110554122247057`*^9, {3.61105548115583*^9, 3.6110555979914217`*^9}, {
   3.6110556586225224`*^9, 3.611055838174179*^9}, {3.6110558722626667`*^9, 
   3.6110559491284657`*^9}, {3.611056017679894*^9, 3.611056063558569*^9}, {
   3.6110561181820793`*^9, 3.6110564246072817`*^9}, {3.611056516724223*^9, 
   3.611056520166006*^9}, {3.611056560689189*^9, 3.611056640373776*^9}, {
   3.611056691019245*^9, 3.611056751936221*^9}, {3.611056800251309*^9, 
   3.611056806947529*^9}, {3.611057049436596*^9, 3.611057145659349*^9}, {
   3.611057198702064*^9, 3.611057209164892*^9}, {3.6110572398248863`*^9, 
   3.611057309311469*^9}, {3.611057380670196*^9, 3.611057397509762*^9}, {
   3.611057872710017*^9, 3.611057895734671*^9}, {3.611057981162518*^9, 
   3.611058020895988*^9}, {3.61105808544413*^9, 3.611058098396516*^9}, {
   3.611058137244137*^9, 3.6110581489439497`*^9}, {3.611058179865505*^9, 
   3.611058188368331*^9}, {3.611058368855933*^9, 3.611058459666366*^9}, {
   3.6110585062678223`*^9, 3.611058515088179*^9}, {3.611058683046193*^9, 
   3.6110587239552393`*^9}, {3.611058778366829*^9, 3.611058798748345*^9}, {
   3.6110592792409573`*^9, 3.6110593709868507`*^9}, {3.611059474161882*^9, 
   3.611059474873088*^9}, {3.611059613052334*^9, 3.6110596156827507`*^9}, {
   3.611059795555162*^9, 3.611059832000711*^9}, {3.611059875969754*^9, 
   3.611059890765058*^9}, {3.6110600140743*^9, 3.611060016615623*^9}, 
   3.611060078119891*^9, {3.611060305747816*^9, 3.611060366047469*^9}, {
   3.611060525505487*^9, 3.611060539505165*^9}, {3.611061133353788*^9, 
   3.611061135678336*^9}, {3.611061388217597*^9, 3.611061553468246*^9}, {
   3.611061802619281*^9, 3.611061806384762*^9}, {3.6110618847990303`*^9, 
   3.611061885348996*^9}, {3.6110619288889*^9, 3.611061934203059*^9}, {
   3.611061984396843*^9, 3.611061985300633*^9}, {3.611067971614702*^9, 
   3.611067974632325*^9}, {3.611319512720009*^9, 3.611319546410624*^9}, {
   3.61131961002393*^9, 3.611319705314157*^9}, {3.6113197711753407`*^9, 
   3.611319786223588*^9}, {3.611319822644743*^9, 3.611319827795464*^9}, {
   3.6113198671390133`*^9, 3.611320050138114*^9}, {3.61132008412216*^9, 
   3.611320159873168*^9}, {3.611320213916152*^9, 3.611320278392947*^9}, {
   3.6113203217671213`*^9, 3.611320328702923*^9}, {3.611320367927764*^9, 
   3.6113203983865147`*^9}, {3.611320532825408*^9, 3.611320557999262*^9}, {
   3.6113206256909943`*^9, 3.611320663143249*^9}, 3.611321072431799*^9, {
   3.611321144306485*^9, 3.611321148298451*^9}, {3.6113211858579082`*^9, 
   3.6113212319500723`*^9}, {3.61132130659006*^9, 3.611321356515328*^9}, 
   3.611321386529532*^9, {3.611321430047812*^9, 3.61132146658957*^9}, {
   3.6113215197553263`*^9, 3.611321543792676*^9}, {3.611321623841846*^9, 
   3.6113216259248867`*^9}, {3.611321697436728*^9, 3.6113217005894737`*^9}, {
   3.611321825408422*^9, 3.611321827847822*^9}, {3.61132237894659*^9, 
   3.611322412998003*^9}, {3.611322496516427*^9, 3.611322502497974*^9}, 
   3.611322562631959*^9, {3.611322687571451*^9, 3.611322700328417*^9}, {
   3.611323034436426*^9, 3.611323082857182*^9}, 3.61132312982672*^9, {
   3.611323224852324*^9, 3.611323225458325*^9}, {3.61132763980155*^9, 
   3.611327649219719*^9}, {3.611659985084736*^9, 3.611659991594058*^9}, {
   3.6116600326472*^9, 3.611660033192404*^9}, 3.611660090813795*^9, {
   3.612526309944765*^9, 3.6125263342808943`*^9}, {3.612526446222348*^9, 
   3.6125264500842*^9}, {3.612526569586886*^9, 3.612526601985379*^9}, {
   3.612526823883008*^9, 3.612526860805152*^9}, {3.6125268997768717`*^9, 
   3.612526900503441*^9}, {3.612526937962799*^9, 3.6125269715728073`*^9}, {
   3.612527214788402*^9, 3.612527247528837*^9}, {3.61252954819729*^9, 
   3.612529559923532*^9}, {3.6127985287631474`*^9, 3.612798563870821*^9}, {
   3.6128814207458982`*^9, 3.6128814962970333`*^9}, {3.6128815264579487`*^9, 
   3.61288157350947*^9}, {3.620992736549479*^9, 3.620992750102221*^9}, {
   3.6300765640182943`*^9, 3.630076564947266*^9}, {3.630076718775549*^9, 
   3.630076723980213*^9}, {3.630079493191619*^9, 3.630079576163731*^9}, {
   3.6300800724873*^9, 3.630080133971504*^9}, {3.630080216103034*^9, 
   3.6300802187827044`*^9}, {3.630080331643449*^9, 3.630080355820588*^9}, {
   3.6300803957510357`*^9, 3.630080423437603*^9}, {3.630081065209969*^9, 
   3.630081077059422*^9}, {3.630081133143005*^9, 3.630081133333531*^9}, {
   3.6300811908202457`*^9, 3.63008121060236*^9}, {3.632572870169973*^9, 
   3.6325729806707983`*^9}, 3.632573143383786*^9, 3.632574026842355*^9, {
   3.632574241727459*^9, 3.632574245685714*^9}, {3.6328407337297173`*^9, 
   3.632840800407886*^9}, {3.632840882917116*^9, 3.6328408866639757`*^9}, 
   3.6328409453546133`*^9, {3.6328410084005013`*^9, 3.6328410239755583`*^9}, {
   3.632841129533347*^9, 3.632841140457273*^9}, {3.632842309556419*^9, 
   3.632842313225905*^9}, 3.632846623645195*^9, {3.63284670427768*^9, 
   3.632846706220399*^9}, {3.63284674969489*^9, 3.63284675094941*^9}, {
   3.6328468467785807`*^9, 3.632846848397704*^9}, {3.632847202502903*^9, 
   3.632847207085455*^9}, {3.632847320249295*^9, 3.632847321496254*^9}, {
   3.632847353703261*^9, 3.6328473592987537`*^9}, 3.632847419641416*^9, {
   3.632847705611363*^9, 3.6328477062266607`*^9}, {3.632847784381083*^9, 
   3.632847784819519*^9}, {3.632847842262051*^9, 3.632847842628912*^9}, {
   3.63317354582155*^9, 3.633173592195918*^9}, {3.6331741624285297`*^9, 
   3.633174202146892*^9}, {3.6331742482039022`*^9, 3.633174278286244*^9}, {
   3.633174442499571*^9, 3.633174447693708*^9}, {3.6331745087054873`*^9, 
   3.633174512578648*^9}, {3.6331746170273447`*^9, 3.6331746516140327`*^9}, {
   3.633606722726521*^9, 3.6336067915667458`*^9}, 3.633607270130712*^9, {
   3.633607400641426*^9, 3.633607415423307*^9}, {3.6336075289934196`*^9, 
   3.6336075503842487`*^9}, {3.6336076695519123`*^9, 
   3.6336077089355497`*^9}, {3.6336098783558187`*^9, 3.633609966402679*^9}, {
   3.633610029228006*^9, 3.633610032431242*^9}, {3.6336100691438847`*^9, 
   3.633610070985608*^9}, 3.633689645366371*^9, {3.633689693054413*^9, 
   3.6336896943570547`*^9}, {3.6338765623949957`*^9, 3.633876604575293*^9}, {
   3.633876652311283*^9, 3.633876674259307*^9}, {3.633876808436173*^9, 
   3.633876831600932*^9}, 3.633876988687347*^9, {3.633877273863027*^9, 
   3.63387728268722*^9}, {3.633877376293767*^9, 3.633877380538412*^9}, {
   3.63439899427428*^9, 3.634399016922064*^9}, {3.634399163453767*^9, 
   3.634399174063924*^9}, {3.634399224275321*^9, 3.6343992348927727`*^9}, {
   3.634399737255699*^9, 3.634399738990199*^9}, {3.6343999109760323`*^9, 
   3.6343999128787327`*^9}, {3.635002374505145*^9, 3.635002399303124*^9}, {
   3.659709412539537*^9, 3.659709443883134*^9}, {3.65970949061235*^9, 
   3.659709589691539*^9}, {3.6597096204978867`*^9, 3.65970965614679*^9}, {
   3.659709698025058*^9, 3.659709765221332*^9}, {3.659709815579021*^9, 
   3.659709834565371*^9}, {3.659709985759123*^9, 3.659710036477479*^9}, {
   3.659710123706335*^9, 3.65971021121342*^9}, {3.659710257019327*^9, 
   3.6597102882122717`*^9}, {3.659712534842119*^9, 3.659712539550868*^9}, {
   3.6597128958848047`*^9, 3.659712912666757*^9}, 3.6597129544188232`*^9, 
   3.674557296842341*^9}],

Cell[BoxData["1.02`"], "Output",
 CellChangeTimes->{3.659712310583434*^9, 3.659712617411006*^9, 
  3.659712920920692*^9, 3.659712956626812*^9, 3.661083509862368*^9, 
  3.6610850861239634`*^9}],

Cell[BoxData["\<\"/Users/andrewjyates/Dropbox/electric cars/welfare\"\>"], \
"Output",
 CellChangeTimes->{3.659712310583434*^9, 3.659712617411006*^9, 
  3.659712920920692*^9, 3.659712956626812*^9, 3.661083509862368*^9, 
  3.6610850861299953`*^9}],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Probability at current subsidy \"\>", "\[InvisibleSpace]", 
   "0.9925000000001399467747959841051292797`12.639807565227894"}],
  SequenceForm[
  "Probability at current subsidy ", 
   0.9925000000001399467747959841051292797`12.639807565227894],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.6610850863061523`*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Welfare from state  \"\>", "\[InvisibleSpace]", 
   TagBox[
    InterpretationBox["\<\"2582259319.20995\"\>",
     2.5822593192099495`*^9,
     AutoDelete->True],
    AccountingForm[#, 15]& ]}],
  SequenceForm["Welfare from state  ", 
   AccountingForm[2.5822593192099495`*^9, 15]],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086310861*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Welfare from uniform current subsidy (7500)  \"\>", 
   "\[InvisibleSpace]", 
   TagBox[
    InterpretationBox["\<\"2582259298.6306\"\>",
     2.582259298630602*^9,
     AutoDelete->True],
    AccountingForm[#, 15]& ]}],
  SequenceForm["Welfare from uniform current subsidy (7500)  ", 
   AccountingForm[2.582259298630602*^9, 15]],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.6610850863163137`*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Exact  \"\>", "\[InvisibleSpace]", "20.579347610473633`"}],
  SequenceForm["Exact  ", 20.579347610473633`],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.6610850863215513`*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Optimal Single Subsidy  \"\>", "\[InvisibleSpace]", 
   RowBox[{"-", "7500"}]}],
  SequenceForm["Optimal Single Subsidy  ", -7500],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086327368*^9}],

Cell[BoxData["\<\" \"\>"], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086332827*^9}],

Cell[BoxData["\<\" Data for Spreadsheet - Table_welfare_vx \"\>"], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086338599*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Welfare from uniform current subsidy (7500)  \"\>", 
   "\[InvisibleSpace]", 
   TagBox[
    InterpretationBox["\<\"2582259298.6306\"\>",
     2.582259298630602*^9,
     AutoDelete->True],
    AccountingForm[#, 15]& ]}],
  SequenceForm["Welfare from uniform current subsidy (7500)  ", 
   AccountingForm[2.582259298630602*^9, 15]],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.6610850863452387`*^9}],

Cell[BoxData["\<\" \"\>"], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086350904*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Probability at current subsidy \"\>", "\[InvisibleSpace]", 
   "0.97999999999872914031137036700552563057`12.1242012312011"}],
  SequenceForm[
  "Probability at current subsidy ", 
   0.97999999999872914031137036700552563057`12.1242012312011],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086460075*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Welfare from state  \"\>", "\[InvisibleSpace]", 
   TagBox[
    InterpretationBox["\<\"2582259380.46145\"\>",
     2.5822593804614525`*^9,
     AutoDelete->True],
    AccountingForm[#, 15]& ]}],
  SequenceForm["Welfare from state  ", 
   AccountingForm[2.5822593804614525`*^9, 15]],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086465766*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Welfare from uniform current subsidy (7500)  \"\>", 
   "\[InvisibleSpace]", 
   TagBox[
    InterpretationBox["\<\"2582259325.61648\"\>",
     2.582259325616475*^9,
     AutoDelete->True],
    AccountingForm[#, 15]& ]}],
  SequenceForm["Welfare from uniform current subsidy (7500)  ", 
   AccountingForm[2.582259325616475*^9, 15]],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.6610850864710207`*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Exact  \"\>", "\[InvisibleSpace]", "54.844977378845215`"}],
  SequenceForm["Exact  ", 54.844977378845215`],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086476548*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Optimal Single Subsidy  \"\>", "\[InvisibleSpace]", 
   RowBox[{"-", "7500"}]}],
  SequenceForm["Optimal Single Subsidy  ", -7500],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086482052*^9}],

Cell[BoxData["\<\" \"\>"], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.66108508648759*^9}],

Cell[BoxData["\<\" Data for Spreadsheet - Table_welfare_vx \"\>"], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086492725*^9}],

Cell[BoxData[
 InterpretationBox[
  RowBox[{"\<\"Welfare from uniform current subsidy (7500)  \"\>", 
   "\[InvisibleSpace]", 
   TagBox[
    InterpretationBox["\<\"2582259325.61648\"\>",
     2.582259325616475*^9,
     AutoDelete->True],
    AccountingForm[#, 15]& ]}],
  SequenceForm["Welfare from uniform current subsidy (7500)  ", 
   AccountingForm[2.582259325616475*^9, 15]],
  Editable->False]], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.6610850864983397`*^9}],

Cell[BoxData["\<\" \"\>"], "Print",
 CellChangeTimes->{3.659712956866156*^9, 3.66108351013265*^9, 
  3.661085086503498*^9}]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 RowBox[{"\[IndentingNewLine]", "\[IndentingNewLine]"}]], "Input",
 CellChangeTimes->{{3.610984476370016*^9, 3.610984479394001*^9}}],

Cell[BoxData["\[IndentingNewLine]"], "Input",
 CellChangeTimes->{3.6343997126517897`*^9}]
},
WindowSize->{848, 865},
WindowMargins->{{4, Automatic}, {Automatic, 0}},
FrontEndVersion->"10.1 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 23, \
2015)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 32542, 699, 3871, "Input"],
Cell[33124, 723, 192, 3, 28, "Output"],
Cell[33319, 728, 246, 4, 28, "Output"],
Cell[CellGroupData[{
Cell[33590, 736, 413, 9, 22, "Print"],
Cell[34006, 747, 449, 12, 21, "Print"],
Cell[34458, 761, 500, 13, 22, "Print"],
Cell[34961, 776, 276, 6, 21, "Print"],
Cell[35240, 784, 298, 7, 22, "Print"],
Cell[35541, 793, 123, 2, 21, "Print"],
Cell[35667, 797, 163, 2, 22, "Print"],
Cell[35833, 801, 500, 13, 22, "Print"],
Cell[36336, 816, 123, 2, 21, "Print"],
Cell[36462, 820, 409, 9, 22, "Print"],
Cell[36874, 831, 449, 12, 21, "Print"],
Cell[37326, 845, 501, 13, 22, "Print"],
Cell[37830, 860, 274, 6, 21, "Print"],
Cell[38107, 868, 298, 7, 22, "Print"],
Cell[38408, 877, 122, 2, 21, "Print"],
Cell[38533, 881, 163, 2, 22, "Print"],
Cell[38699, 885, 501, 13, 22, "Print"],
Cell[39203, 900, 123, 2, 21, "Print"]
}, Open  ]]
}, Open  ]],
Cell[39353, 906, 146, 2, 63, "Input"],
Cell[39502, 910, 89, 1, 46, "Input"]
}
]
*)

(* End of internal cache information *)
